﻿<%@ Page Title="" Language="C#" MasterPageFile="~/HMS.Master" AutoEventWireup="true" CodeBehind="Invoice.aspx.cs" Inherits="ReservationModule.Invoice"%>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .auto-style2 {
            width: 100%;
        }
        .auto-style3 {
            height: 22px;
        }
        .auto-style4 {
            font-size: large;
        }
        .auto-style5 {
            width: 129px;
            height: 25px;
        }
        .auto-style6 {
            height: 22px;
            width: 129px;
        }
        .auto-style9 {
            width: 564px;
            height: 25px;
        }
        .auto-style10 {
            height: 22px;
            width: 564px;
        }
        .auto-style11 {
            width: 173px;
        }
        .auto-style12 {
            width: 173px;
            height: 22px;
        }
        .auto-style13 {
            font-size: x-large;
        }
        .auto-style15 {
            height: 25px;
        }
        .auto-style16 {
            height: 22px;
            width: 110px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="auto-style2">
        <tr>
            <td class="auto-style5">
    <p class="auto-style4">
        <strong>To</strong></p>
            </td>
            <td class="auto-style9">
                                    &nbsp;</td>
            <td class="auto-style15" colspan="2"><span class="auto-style4"><strong>
                <br />
                From</strong><br />
                <strong>Delonix Regia Hotel</strong></td>
        </tr>
        <tr>
            <td class="auto-style6">Customer ID:
    </td>
            <td class="auto-style10">
    <asp:Label ID="lblCustomerID" runat="server" Text=""></asp:Label>
            </td>
            <td class="auto-style16">Invoice ID:</td>
            <td class="auto-style3">INV<asp:Label ID="lblInvoice" runat="server" Text=""></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="auto-style6">First Name:</td>
            <td class="auto-style10">
    <asp:Label ID="lblFirstName" runat="server" Text=""></asp:Label>
            </td>
            <td class="auto-style16">Invoice Date:</td>
            <td class="auto-style3">
                <asp:Label ID="lblDate" runat="server" Text=""></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="auto-style6">Last Name:</td>
            <td class="auto-style10">
    <asp:Label ID="lblLastName" runat="server" Text=""></asp:Label>
            </td>
            <td class="auto-style16"></td>
            <td class="auto-style3"></td>
        </tr>
        <tr>
            <td class="auto-style6">NRIC:</td>
            <td class="auto-style10"> <asp:Label ID="lblNRIC" runat="server" Text=""></asp:Label>
            </td>
            <td class="auto-style16"></td>
            <td class="auto-style3"></td>
        </tr>
        <tr>
            <td class="auto-style6">Payment Mode:</td>
            <td class="auto-style10"> 
                <asp:Label ID="lblPaymentMode" runat="server" Text=""></asp:Label>
            </td>
            <td class="auto-style16">&nbsp;</td>
            <td class="auto-style3">&nbsp;</td>
        </tr>
    </table>
    <br />
    <strong><span class="auto-style13">Reservation Details</span></strong><br />
    <br />
    Reservation ID:
    <asp:Label ID="lblReservationID" runat="server" Text=""></asp:Label>
&nbsp;<p>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="ReservationDataSource" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black">
            <Columns>
                <asp:BoundField DataField="DesiredCheckInDate" HeaderText="DesiredCheckInDate" SortExpression="DesiredCheckInDate" DataFormatString="{0:dd-MM-yyyy}"/>
                <asp:BoundField DataField="DesiredCheckOutDate" HeaderText="DesiredCheckOutDate" SortExpression="DesiredCheckOutDate" DataFormatString="{0:dd-MM-yyyy}"/>
                <asp:BoundField DataField="NumberOfGuestAdults" HeaderText="NumberOfGuestAdults" SortExpression="NumberOfGuestAdults" />
                <asp:BoundField DataField="NumberOfGuestChildren" HeaderText="NumberOfGuestChildren" SortExpression="NumberOfGuestChildren" />
                <asp:BoundField DataField="NumberOfNights" HeaderText="NumberOfNights" SortExpression="NumberOfNights" />
                <asp:BoundField DataField="NumberOfRooms" HeaderText="NumberOfRooms" SortExpression="NumberOfRooms" />
                <asp:BoundField DataField="AdditionalRemarks" HeaderText="AdditionalRemarks" SortExpression="AdditionalRemarks" />
            </Columns>
            <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
            <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
            <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F7F7F7" />
            <SortedAscendingHeaderStyle BackColor="#4B4B4B" />
            <SortedDescendingCellStyle BackColor="#E5E5E5" />
            <SortedDescendingHeaderStyle BackColor="#242121" />
        </asp:GridView>
        <asp:SqlDataSource ID="ReservationDataSource" runat="server" ConnectionString="Data Source=localhost;Initial Catalog=hmsdb;Persist Security Info=True;User ID=sa;Password=imsa" ProviderName="System.Data.SqlClient" SelectCommand="SELECT [DesiredCheckInDate], [DesiredCheckOutDate], [NumberOfGuestAdults], [NumberOfGuestChildren], [NumberOfNights], [NumberOfRooms], [AdditionalRemarks] FROM [Reservation] WHERE ([ReservationID] = @ReservationID)">
            <SelectParameters>
                <asp:ControlParameter ControlID="lblReservationID" Name="ReservationID" PropertyName="Text" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        <strong><span class="auto-style13">Room(s) Details</span></strong></p>
    <p>
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataKeyNames="RoomID" DataSourceID="RoomDataSource" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="4" ForeColor="Black">
            <Columns>
                <asp:BoundField DataField="RoomID" HeaderText="RoomID" InsertVisible="False" ReadOnly="True" SortExpression="RoomID" />
                <asp:BoundField DataField="RoomType" HeaderText="RoomType" SortExpression="RoomType" />
                <asp:BoundField DataField="RoomRate" HeaderText="RoomRate" SortExpression="RoomRate" />
                <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
            </Columns>
            <FooterStyle BackColor="#CCCC99" ForeColor="Black" />
            <HeaderStyle BackColor="#333333" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
            <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
            <SortedAscendingCellStyle BackColor="#F7F7F7" />
            <SortedAscendingHeaderStyle BackColor="#4B4B4B" />
            <SortedDescendingCellStyle BackColor="#E5E5E5" />
            <SortedDescendingHeaderStyle BackColor="#242121" />
        </asp:GridView>
        <asp:SqlDataSource ID="RoomDataSource" runat="server" ConnectionString="Data Source=localhost;Initial Catalog=hmsdb;Persist Security Info=True;User ID=sa;Password=imsa" ProviderName="System.Data.SqlClient" SelectCommand="SELECT [RoomID], [RoomType], [RoomRate], [Description] FROM [Room] WHERE ([ReservationID] = @ReservationID)">
            <SelectParameters>
                <asp:ControlParameter ControlID="lblReservationID" Name="ReservationID" PropertyName="Text" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        &nbsp;</p>
    <table class="auto-style2">
        <tr>
            <td class="auto-style11">Room Charges: </td>
            <td>
                SGD
                <asp:Label ID="lblRoomCharges" runat="server" Text=""></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="auto-style12">Tax:</td>
            <td class="auto-style3">
                SGD
                <asp:Label ID="lblTax" runat="server" Text=""></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="auto-style11">Total:</td>
            <td>
                SGD
                <asp:Label ID="lblTotal" runat="server" Text=""></asp:Label>
            </td>
        </tr>
    </table>
    <p>
        <asp:Button ID="btnDone" runat="server" OnClick="btnDone_Click" OnClientClick="return alert('Delete Successful!');" Text="Done" />
    </p>
</asp:Content>
